import { createRouter, createWebHistory } from 'vue-router'
import Login from "@/views/Login.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path: '/register',
      name: 'resgister',
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Register.vue')
    },
    {
      path: '/list',
      name: 'list',
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/List.vue')
    }
  ]
})

export default router
